<!DOTTYPE html>
    <html>

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>POST 请求测试</title>
        <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css"
            integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
        <style>
            div.container {
                margin-top: 50px;
            }

            form {
                margin: 20px;
            }
        </style>
    </head>

    <body>
        <div class="container col-4">
            <h1 class="text-center">登录表单</h1>
            <?php if (!empty($error)): ?>
            <div class="alert alert-danger" role="alert">
                <?= $error ?>
            </div>
            <?php endif; ?>
            <form action="login.php" method="POST">
                <div class="form-group">
                    <label for="inputUserName">用户名</label>
                    <input type="input" class="form-control" id="inputUserName" name="name">
                </div>
                <div class="form-group">
                    <label for="inputPassword">密码</label>
                    <input type="password" class="form-control" id="inputPassword" name="password">
                </div>
                <button type="submit" class="btn btn-primary">登录</button>
            </form>

        </div>
    </body>

    </html>